 				<#include  "/common/freemarker/macro_common.ftl">
 				<#include  "/app/common/uploadimage/attachment.ftl">
 				<#-- 附件宏里用到了jquery,所以把jquery-js在这里引入 -->
 				<#--
			 	<script src="<@context/>js/jquery.min63b9.js?v=2.1.4"></script>
				
				-->
	
 				<#assign grades=["一等奖","二等奖","三等奖"]>
 				<form id="subForm" class="form-horizontal"    method="post"  >
        			 	    <input class="subData" type="hidden" name="subUuid" id="subUuid" value='' />
        			 
		                    <div class="form-group">
		                    	<label class="col-md-2 control-label">奖品等级 <font color="red"> *</font></label>
		                        <div class="col-md-9">
		                        	<select class="form-control subData" id="grade" name="grade">
		                           <#list grades as grade>
		                           		<option value="${grade}" >${grade}</option>
		                           </#list>
								   </select>
		                    	</div>              	
		                    </div> 
		                    <div class="form-group">
		                    	<label class="col-md-2 control-label">奖品名称 <font color="red"> *</font></label>
		                        <div class="col-md-9">
									<input type="text"  class="input-sm form-control required subData" id="name" name="name" value=''      />
		                    	</div>              	
		                    </div> 
             				 
		                    <div class="form-group">
		                    	<label class="col-md-2 control-label">奖品图片<font color="red"></font></label>
		                        <div class="col-md-10">
						            <#assign tmps="">
		                        	<#if sub?exists>
										<#assign tmps=sub.image?if_exists>
		                        	</#if>
		                   			 <@imageAttachment  id="image" name="image" value=tmps namePrefix=""  showType="all" /> 
							     </div>              	
		                    </div>
		                    
		                     <div class="form-group">
		                    	<div class="col-md-offset-2 col-md-9">
		                    	    
		                    		<input type="button" class="btn btn-sm  btn-primary" id="submitBtn" value="保存数据" onclick="saveSub()"/>&nbsp;&nbsp;
 
		                    	</div>
		                    </div>		                    
                 </form> 
                 <script>
                 	  <#if sub?exists>
                 	  		$("#grade").val("${sub.grade}");
                 	  		$("#name").val("${sub.name}");
                 	  		 
                 	  </#if>
                 </script>  